using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using PraxisRent.Entities;

namespace PraxisRent.Repository.Mapping
{
    public class DETALLE_CREDITOMap : EntityTypeConfiguration<DETALLE_CREDITO>
    {
        public DETALLE_CREDITOMap()
        {
            // Primary Key
            this.HasKey(t => t.Id);

            // Properties
            this.Property(t => t.Id)
                .IsRequired();

            this.Property(t => t.CodigoEquipo)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            // Table & Column Mappings
            this.ToTable("DETALLE_CREDITO");
            this.Property(t => t.CodigoEquipo).HasColumnName("CodigoEquipo");
            this.Property(t => t.NumHoras).HasColumnName("NumHoras");
            this.Property(t => t.Monto).HasColumnName("Monto");

            // Relationships

        }
    }
}
